package com.vvv.shortlink.common.enums;

import com.vvv.shortlink.common.convention.errorcode.IErrorCode;

/**
 * @author vvv
 * @date 2024/1/28 18 22
 * discription
 */
public enum UserErrorCodeEnum implements IErrorCode {

    USER_IS_NULL("A000114", "用户名不存在"),

    USER_NAME_IS_NULL("A000115", "用户名不能为空"),

    USER_PASSWORD_IS_NULL("A000116", "密码不能为空"),

    USER_NAME_EXISTED("A000117", "用户名已存在"),

    CANNOT_REGISTER_REPEATEDLY("A000117", "用户名已存在"),

    NOT_LOGIN("A000118", "请登录");

    private final String code;

    private final String message;

    UserErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 错误码
     */
    @Override
    public String code() {
        return code;
    }

    /**
     * 错误信息
     */
    @Override
    public String message() {
        return message;
    }
}
